package com.neusoft.a132wxyorderingdish.service;

import com.neusoft.a132wxyorderingdish.beans.CollectBean;
import com.neusoft.a132wxyorderingdish.beans.CollectResultBean;
import com.neusoft.a132wxyorderingdish.beans.CommentBean;
import com.neusoft.a132wxyorderingdish.beans.FoodBean;
import com.neusoft.a132wxyorderingdish.beans.ResultBean;
import com.neusoft.a132wxyorderingdish.beans.ShopBean;
import com.neusoft.a132wxyorderingdish.beans.UserInfo;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface ShopService {
    @GET("getAllShops.do")
    Call<List<ShopBean>> getAllShops();
    //获取店铺所有菜单
    @GET("getFoodByShop.do")
    Call<List<FoodBean>>getFoodByShop(@Query("shop_id")String shop_id);

    //获取店铺详情
    @GET("getShopById.do")
    Call<ShopBean>getShopById(@Query("shop_id") String shop_id);

    //获取菜单详情
    @GET("getFoodById.do")
    Call<FoodBean>getFoodById(@Query("food_id")String food_id);

    //获取菜单评价
    @GET("getAllCommentsByFood.do")
    Call<List<CommentBean>>getAllCommentsByFood(@Query("food_id")String food_id);

    //判断是否收藏
    @GET("isCollected.do")
    Call<CollectResultBean>isCollected(@Query("user_id") String user_id,
                                       @Query("shop_food_id") String shop_food_id,
                                       @Query("flag") String flag);

    //获取当前用户的收藏列表
    @GET("getAllUserCollection.do")
    Call<List<CollectBean>>getAllUserCollection(@Query("user_id")String user_id,
                                                @Query("flag")String flag);
    //收藏/取消店铺
    @GET("userCollectShop.do")
    Call<ResultBean>userCollectShop(@Query("user_id")String user_id, @Query("shop_id")String shop_id);
    //收藏/取消菜单
    @GET("userCollectFood.do")
    Call<ResultBean>userCollectFood(@Query("user_id")String user_id,@Query("food_id")String food_id);

    //搜索菜谱或口味
    @GET("getFoodBySearch.do")
    Call<List<FoodBean>>getFoodBySearch(@Query("search")String search);


    //获取用户信息
    @GET("getUserById.do")
    Call<UserInfo>getUserById(@Query("user_id")String user_id);

    //修改用户信息
    @GET("updateUserById.do")
    Call<ResultBean>updateUserById(@Query("user_id")String user_id,
                                   @Query("username")String username,
                                   @Query("userpass")String userpass,
                                   @Query("mobilenum")String mobilenum,
                                   @Query("address")String address);
}
